package com.crm.business.auth.service;


import com.crm.common.auth.entity.AuthorizationUser;
import com.crm.common.ka.core.common.Result;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * @author z
 */
public interface LoginService {
    /**
     * 登录方法的处理
     * @param user 用户对象
     * @param request
     * @return Result
     */
    public Result login(AuthorizationUser user, HttpServletResponse response, HttpServletRequest request);

    /**
     * 预登录
     * @param user 用户对象
     * @return Result
     */
    public Result doLogin(AuthorizationUser user, HttpServletResponse response, HttpServletRequest request);


    /**
     * 权限验证
     * @param authentication
     * @param url
     * @param method
     * @return Result
     */
    Result permission(String authentication, String url, String method);

    /**
     * 退出登陆
     * @param authentication
     * @return Result
     */
    Result logout(String authentication);

    public void updateLoginUserInfo(List<Long> userId);
}
